
#include <iostream>

/*=================================
* 继承就是别人的东西就是我的东西，我的东西还是我的东西
* 
==================================*/

using namespace std;

class Person
{
public:
    void eat(string food)
    {
        cout<<"I am eating "<<food<<endl;
    }
};

class Student:public Person
{
public:
    void study(string course)
    {
        cout<<"I am student I study"<<course<<endl;
    }
};

class Teacher:public Person
{
public:
    void teach(string course)
    {
        cout<<"I am teacher I teach "<<course<<endl;
    }
};

int main(void)
{
    Student st;
    st.eat("chiken");
    st.study("php");

    Teacher te;
    te.eat("dog");
    te.teach("JAVA");
    
    return 0;
}


